home *** CD-ROM | disk | FTP | other *** search
/ AGA Toolkit '97 / The AGA Toolkit '97.iso / programming / c / make-3.75 / makefile.ami < prev    next >
Encoding:
Makefile  |  1996-09-07  |  10.1 KB  |  306 lines

  1. # NOTE: If you have no `make' program at all to process this makefile, run
  2. # `build.sh' instead.
  3. #
  4. # Copyright (C) 1988, 89, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
  5. # This file is part of GNU Make.
  6. #
  7. # GNU Make is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 2, or (at your option)
  10. # any later version.
  11. #
  12. # GNU Make is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with GNU Make; see the file COPYING.  If not, write to
  19. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  
  21. #
  22. #    Makefile for GNU Make
  23. #
  24.  
  25. # Ultrix 2.2 make doesn't expand the value of VPATH.
  26. VPATH = /make-3.74/
  27. # This must repeat the value, because configure will remove `VPATH = .'.
  28. srcdir = /make-3.74/
  29.  
  30. CC = sc
  31. RM = delete
  32.  
  33. CFLAGS =
  34. CPPFLAGS =
  35. LDFLAGS =
  36.  
  37. # Define these for your system as follows:
  38. #    -DNO_ARCHIVES        To disable `ar' archive support.
  39. #    -DNO_FLOAT        To avoid using floating-point numbers.
  40. #    -DENUM_BITFIELDS    If the compiler isn't GCC but groks enum foo:2.
  41. #                Some compilers apparently accept this
  42. #                without complaint but produce losing code,
  43. #                so beware.
  44. # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
  45. # See also `config.h'.
  46. defines =
  47.  
  48. # Which flavor of remote job execution support to use.
  49. # The code is found in `remote-$(REMOTE).c'.
  50. REMOTE = stub
  51.  
  52. # If you are using the GNU C library, or have the GNU getopt functions in
  53. # your C library, you can comment these out.
  54. GETOPT = getopt.o getopt1.o
  55. GETOPT_SRC = $(srcdir)getopt.c $(srcdir)getopt1.c $(srcdir)getopt.h
  56.  
  57. # If you are using the GNU C library, or have the GNU glob functions in
  58. # your C library, you can comment this out.  GNU make uses special hooks
  59. # into the glob functions to be more efficient (by using make's directory
  60. # cache for globbing), so you must use the GNU functions even if your
  61. # system's C library has the 1003.2 glob functions already.  Also, the glob
  62. # functions in the AIX and HPUX C libraries are said to be buggy.
  63. GLOB = glob/glob.lib
  64.  
  65. # If your system doesn't have alloca, or the one provided is bad, define this.
  66. ALLOCA = alloca.o
  67. ALLOCA_SRC = $(srcdir)alloca.c
  68.  
  69. # If your system needs extra libraries loaded in, define them here.
  70. # System V probably need -lPW for alloca.  HP-UX 7.0's alloca in
  71. # libPW.a is broken on HP9000s300 and HP9000s400 machines.  Use
  72. # alloca.c instead on those machines.
  73. LOADLIBES =
  74.  
  75. # Any extra object files your system needs.
  76. extras = amiga.o
  77.  
  78. # Common prefix for machine-independent installed files.
  79. prefix =
  80. # Common prefix for machine-dependent installed files.
  81. exec_prefix =
  82.  
  83. # Directory to install `make' in.
  84. bindir = sc:c
  85. # Directory to find libraries in for `-lXXX'.
  86. libdir = lib:
  87. # Directory to search by default for included makefiles.
  88. includedir = include:
  89. # Directory to install the Info files in.
  90. infodir = doc:
  91. # Directory to install the man page in.
  92. mandir = t:
  93. # Number to put on the man page filename.
  94. manext = 1
  95. # Prefix to put on installed `make' binary file name.
  96. binprefix =
  97. # Prefix to put on installed `make' man page file name.
  98. manprefix = $(binprefix)
  99.  
  100. # Whether or not make needs to be installed setgid.
  101. # The value should be either `true' or `false'.
  102. # On many systems, the getloadavg function (used to implement the `-l'
  103. # switch) will not work unless make is installed setgid kmem.
  104. install_setgid = false
  105. # Install make setgid to this group so it can read /dev/kmem.
  106. group = sys
  107.  
  108. # Program to install `make'.
  109. INSTALL_PROGRAM = copy
  110. # Program to install the man page.
  111. INSTALL_DATA = copy
  112. # Generic install program.
  113. INSTALL = copy
  114.  
  115. # Program to format Texinfo source into Info files.
  116. MAKEINFO = makeinfo
  117. # Program to format Texinfo source into DVI files.
  118. TEXI2DVI = texi2dvi
  119.  
  120. # Programs to make tags files.
  121. ETAGS = etags -w
  122. CTAGS = ctags -w
  123.  
  124. objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o    \
  125.        rule.o implicit.o default.o variable.o expand.o function.o    \
  126.        vpath.o version.o ar.o arscan.o signame.o remote-$(REMOTE).o     \
  127.        $(GETOPT) $(ALLOCA) $(extras)
  128. srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c             \
  129.        $(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c         \
  130.        $(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c             \
  131.        $(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c        \
  132.        $(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c     \
  133.        $(srcdir)vpath.c $(srcdir)version.c                            \
  134.        $(srcdir)remote-$(REMOTE).c                                     \
  135.        $(srcdir)ar.c $(srcdir)arscan.c                                \
  136.        $(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC)            \
  137.        $(srcdir)commands.h $(srcdir)dep.h $(srcdir)file.h            \
  138.        $(srcdir)job.h $(srcdir)make.h $(srcdir)rule.h                \
  139.        $(srcdir)variable.h $(ALLOCA_SRC) $(srcdir)config.h.in
  140.  
  141.  
  142. .SUFFIXES:
  143. .SUFFIXES: .o .c .h .ps .dvi .info .texinfo
  144.  
  145. all: make
  146. info: make.info
  147. dvi: make.dvi
  148. # Some makes apparently use .PHONY as the default goal if it is before `all'.
  149. .PHONY: all check info dvi
  150.  
  151. make.info: make.texinfo
  152.     $(MAKEINFO) -I$(srcdir) $(srcdir)make.texinfo -o make.info
  153.  
  154. make.dvi: make.texinfo
  155.     $(TEXI2DVI) $(srcdir)make.texinfo
  156.  
  157. make.ps: make.dvi
  158.     dvi2ps make.dvi > make.ps
  159.  
  160. make: $(objs) $(GLOB)
  161.     $(CC) Link $(LDFLAGS) $(objs) Lib $(GLOB) $(LOADLIBES) To make.new
  162.     -delete make
  163.     rename make.new make
  164.  
  165. TMPFILE = t:Make$$
  166.  
  167. $(GLOB):
  168.     cd glob @@\
  169.     /make -f makefile
  170.  
  171. # -I. is needed to find config.h in the build directory.
  172. OUTPUT_OPTION =
  173. .c.o:
  174.     $(CC) $(defines) IDir "" IDir $(srcdir)glob \
  175.           $(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION)
  176.  
  177. # For some losing Unix makes.
  178. SHELL = /bin/sh
  179. #@SET_MAKE@
  180.  
  181. glob/libglob.a: FORCE config.h
  182.     cd glob; $(MAKE) libglob.a
  183. FORCE:
  184.  
  185. tagsrcs = $(srcs) $(srcdir)remote-*.c
  186. TAGS: $(tagsrcs)
  187.     $(ETAGS) $(tagsrcs)
  188. tags: $(tagsrcs)
  189.     $(CTAGS) $(tagsrcs)
  190.  
  191. .PHONY: install installdirs
  192. install: installdirs \
  193.      $(bindir)$(binprefix)make $(infodir)make.info \
  194.      $(mandir)$(manprefix)make.$(manext)
  195.  
  196. installdirs:
  197.     $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(mandir)
  198.  
  199. $(bindir)$(binprefix)make: make
  200.     $(INSTALL_PROGRAM) make $@.new
  201.     @if $(install_setgid); then \
  202.        if chgrp $(group) $@.new && chmod g+s $@.new; then \
  203.          echo "chgrp $(group) $@.new && chmod g+s $@.new"; \
  204.        else \
  205.          echo "$@ needs to be owned by group $(group) and setgid;"; \
  206.          echo "otherwise the \`-l' option will probably not work."; \
  207.          echo "You may need special privileges to install $@."; \
  208.        fi; \
  209.      else true; fi
  210. # Some systems can't deal with renaming onto a running binary.
  211.     -$(RM) $@.old
  212.     -mv $@ $@.old
  213.     mv $@.new $@
  214.  
  215. $(infodir)make.info: make.info
  216.     if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
  217.     for file in $${dir}/make.info*; do \
  218.       name="`basename $$file`"; \
  219.       $(INSTALL_DATA) $$file \
  220.         `echo $@ | sed "s,make.info\$$,$$name,"`; \
  221.     done
  222. # Run install-info only if it exists.
  223. # Use `if' instead of just prepending `-' to the
  224. # line so we notice real errors from install-info.
  225. # We use `$(SHELL) -c' because some shells do not
  226. # fail gracefully when there is an unknown command.
  227.     if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
  228.       if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
  229.       install-info --infodir=$(infodir) $$dir/make.info; \
  230.     else true; fi
  231.  
  232. $(mandir)$(manprefix)make.$(manext): make.man
  233.     $(INSTALL_DATA) $(srcdir)make.man $@
  234.  
  235.  
  236. loadavg: loadavg.c config.h
  237.     $(CC) $(defines) -DTEST -I. -I$(srcdir) $(CFLAGS) $(LDFLAGS) \
  238.           loadavg.c $(LOADLIBES) -o $@
  239. # We copy getloadavg.c into a different file rather than compiling it
  240. # directly because some compilers clobber getloadavg.o in the process.
  241. loadavg.c: getloadavg.c
  242.     ln $(srcdir)getloadavg.c loadavg.c || \
  243.     cp $(srcdir)getloadavg.c loadavg.c
  244. check-loadavg: loadavg
  245.     @echo The system uptime program believes the load average to be:
  246.     -uptime
  247.     @echo The GNU load average checking code believes:
  248.     ./loadavg
  249. check: check-loadavg
  250.  
  251.  
  252. .PHONY: clean realclean distclean mostlyclean
  253. clean: glob-clean
  254.     -$(RM) make loadavg "#?.o" core make.dvi
  255.  
  256. distclean: clean glob-realclean
  257.     -$(RM) Makefile config.h config.status build.sh stamp-config
  258.     -$(RM) config.log config.cache
  259.     -$(RM) TAGS tags
  260.     -$(RM) make.?? make.??s make.log make.toc make.*aux
  261.     -$(RM) loadavg.c
  262.  
  263. realclean: distclean
  264.     -$(RM) make.info*
  265. mostlyclean: clean
  266.  
  267. .PHONY: glob-clean glob-realclean
  268. glob-clean glob-realclean:
  269.     cd glob @@\
  270.     $(MAKE) $@
  271.  
  272. # This tells versions [3.59,3.63) of GNU make not to export all variables.
  273. .NOEXPORT:
  274.  
  275. # The automatically generated dependencies below may omit config.h
  276. # because it is included with ``#include <config.h>'' rather than
  277. # ``#include "config.h"''.  So we add the explicit dependency to make sure.
  278. $(objs): config.h
  279.  
  280. # Automatically generated dependencies will be put at the end of the file.
  281.  
  282. # Automatically generated dependencies.
  283. commands.o : commands.c make.h dep.h commands.h file.h variable.h job.h
  284. job.o: job.c make.h commands.h job.h file.h variable.h
  285. dir.o: dir.c make.h
  286. file.o: file.c make.h commands.h dep.h file.h variable.h
  287. misc.o: misc.c make.h dep.h
  288. main.o: main.c make.h commands.h dep.h file.h variable.h job.h getopt.h
  289. read.o: read.c make.h commands.h dep.h file.h variable.h glob/glob.h
  290. remake.o: remake.c make.h commands.h job.h dep.h file.h
  291. rule.o : rule.c make.h config.h commands.h dep.h file.h variable.h rule.h
  292. implicit.o : implicit.c make.h rule.h dep.h file.h
  293. default.o: default.c make.h rule.h dep.h file.h commands.h variable.h
  294. variable.o : variable.c make.h commands.h variable.h dep.h file.h
  295. expand.o: expand.c make.h commands.h file.h variable.h
  296. function.o: function.c make.h variable.h dep.h commands.h job.h
  297. vpath.o : vpath.c make.h file.h variable.h
  298. version.o: version.c
  299. ar.o : ar.c make.h file.h dep.h
  300. arscan.o: arscan.c make.h
  301. signame.o: signame.c signame.h
  302. remote-stub.o : remote-stub.c make.h commands.h
  303. getopt.o: getopt.c getopt.h
  304. getopt1.o : getopt1.c getopt.h
  305. getloadavg.o: getloadavg.c
  306.